﻿using System;
using System.Collections.Generic;

using Moe.ECamel.Common.Entities;

namespace Moe.ECamel.Common.Contracts
{
	public interface IRentalService : IECamelService
	{
		/// <summary>
		/// Returns a list of customer's active rentals.
		/// </summary>
		/// <param name="customerId"></param>
		/// <returns></returns>
		List<Rental> GetCustomerActiveRentals(int customerId);
		/// <summary>
		/// Returns a list of all the customer's rentals.
		/// </summary>
		/// <param name="customerId"></param>
		/// <returns></returns>
		List<Rental> GetCustomerRentals(int customerId);
		/// <summary>
		/// Rents an item.
		/// </summary>
		/// <param name="request">Rental request details.</param>
		/// <returns>Rental response details.</returns>
		RentalResponse RentItem(RentalRequest request);
		/// <summary>
		/// Returns an item.
		/// </summary>
		/// <param name="rentalId">Id of returning rental.</param>
		/// <param name="dateOfReturn">Date of return.</param>
		/// <returns>If an error occured, the error details.</returns>
		ReturnRentalResponse ReturnItem(int rentalId, DateTime dateOfReturn);
		/// <summary>
		/// Pay a rental fine.
		/// </summary>
		/// <param name="rentalId">Id of rental to pay.</param>
		/// <param name="paymentDate">Payment date.</param>
		/// <returns>If an error occured, the error details.</returns>
		ECamelError PayFine(int rentalId, DateTime paymentDate);
	}
}